<template>
  <div>
    <h1>请假</h1>
    <select name="" id="" v-model="jia">
      <option value="1">病假</option>
      <option value="2">事假</option>
    </select>
    <van-button round @click="add">提交</van-button>

  </div>
</template>

<script>
import axios from 'axios'

export default {
  name: "qingjia",
  data() {
    return {
      jia: '',
      userid: localStorage.getItem('userid')
    }
  },
  methods: {
    add() {
      axios.post('http://localhost:5000/qingjia', {'jia': this.jia, 'userid': this.userid}).then(res => {
        if (res.data.code == 200) {
          alert('提交成功')
        }
      })
    }
  }
}
</script>

<style scoped>

</style>